home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / MacOS 8 Resources / Developer Tools / Mac OS 8 Interfaces & Libraries / Interfaces / AIncludes / CommResources.a < prev    next >
Text File  |  1996-05-01  |  10KB  |  434 lines

  1. ;
  2. ;    File:        CommResources.a
  3. ;
  4. ;    Contains:    Communications Toolbox Resource Manager Interfaces.
  5. ;
  6. ;    Version:    Technology:    System 7.5
  7. ;                Release:    Universal Interfaces 3.0d3 on Copland DR1
  8. ;
  9. ;    Copyright:    © 1984-1996 by Apple Computer, Inc.  All rights reserved.
  10. ;
  11. ;    Bugs?:        If you find a problem with this file, send the file and version
  12. ;                information (from above) and the problem description to:
  13. ;
  14. ;                    Internet:    apple.bugs@applelink.apple.com
  15. ;                    AppleLink:    APPLE.BUGS
  16. ;
  17. ;
  18.     IF &TYPE('__COMMRESOURCES__') = 'UNDEFINED' THEN
  19. __COMMRESOURCES__ SET 1
  20.  
  21.     IF &TYPE('__OSUTILS__') = 'UNDEFINED' THEN
  22.     include 'OSUtils.a'
  23.     ENDIF
  24.     IF FOR_SYSTEM7_AND_SYSTEM8_DEPRECATED THEN
  25.  
  26.                                                             ;    tool classes (also the tool file types)    
  27. classCM                            EQU        'cbnd'
  28. classFT                            EQU        'fbnd'
  29. classTM                            EQU        'tbnd'
  30.  
  31.                                                             ;    version of the Comm Resource Manager    
  32. curCRMVersion                    EQU        2                    ; constants general to the use of the Communications Resource Manager 
  33. crmType                            EQU        9                    ; queue type    
  34. crmRecVersion                    EQU        1                    ; version of queue structure 
  35.                                                             ;    error codes 
  36. crmGenericError                    EQU        -1
  37. crmNoErr                        EQU        0
  38. ;  data structures general to the use of the Communications Resource Manager 
  39. ; typedef OSErr                         CRMErr
  40.  
  41. CRMRec                    RECORD 0
  42. qLink                     ds.l    1                ; offset: $0 (0)        ; reserved
  43. qType                     ds.w    1                ; offset: $4 (4)        ; queue type -- ORD(crmType) = 9
  44. crmVersion                 ds.w    1                ; offset: $6 (6)        ; version of queue element data structure
  45. crmPrivate                 ds.l    1                ; offset: $8 (8)        ; reserved
  46. crmReserved                 ds.w    1                ; offset: $C (12)        ; reserved
  47. crmDeviceType             ds.l    1                ; offset: $E (14)        ; type of device, assigned by DTS
  48. crmDeviceID                 ds.l    1                ; offset: $12 (18)        ; device ID; assigned when CRMInstall is called
  49. crmAttributes             ds.l    1                ; offset: $16 (22)        ; pointer to attribute block
  50. crmStatus                 ds.l    1                ; offset: $1A (26)        ; status variable - device specific
  51. crmRefCon                 ds.l    1                ; offset: $1E (30)        ; for device private use
  52. sizeof                     EQU *                    ; size:   $22 (34)
  53.                         ENDR
  54. ; typedef struct CRMRec *                CRMRecPtr
  55.  
  56. ;
  57. ; pascal CRMErr InitCRM(void )
  58. ;
  59.     IF ¨ GENERATINGCFM THEN
  60.         Macro
  61.         _InitCRM
  62.             move.w              #$0501,-(sp)
  63.             move.l              sp,A0
  64.             dc.w                $A08B
  65.             addq.w              #2,sp
  66.         EndM
  67.     ELSE
  68.         IMPORT_CFM_FUNCTION InitCRM
  69.     ENDIF
  70.  
  71. ;
  72. ; pascal QHdrPtr CRMGetHeader(void )
  73. ;
  74.     IF ¨ GENERATINGCFM THEN
  75.         Macro
  76.         _CRMGetHeader
  77.             move.w              #$0502,-(sp)
  78.             move.l              sp,A0
  79.             dc.w                $A08B
  80.             addq.w              #2,sp
  81.         EndM
  82.     ELSE
  83.         IMPORT_CFM_FUNCTION CRMGetHeader
  84.     ENDIF
  85.  
  86. ;
  87. ; pascal void CRMInstall(CRMRecPtr crmReqPtr)
  88. ;
  89.     IF ¨ GENERATINGCFM THEN
  90.         Macro
  91.         _CRMInstall
  92.             move.w              #$0503,-(sp)
  93.             move.l              sp,A0
  94.             dc.w                $A08B
  95.             addq.w              #2,sp
  96.         EndM
  97.     ELSE
  98.         IMPORT_CFM_FUNCTION CRMInstall
  99.     ENDIF
  100.  
  101. ;
  102. ; pascal OSErr CRMRemove(CRMRecPtr crmReqPtr)
  103. ;
  104.     IF ¨ GENERATINGCFM THEN
  105.         Macro
  106.         _CRMRemove
  107.             move.w              #$0504,-(sp)
  108.             move.l              sp,A0
  109.             dc.w                $A08B
  110.             addq.w              #2,sp
  111.         EndM
  112.     ELSE
  113.         IMPORT_CFM_FUNCTION CRMRemove
  114.     ENDIF
  115.  
  116. ;
  117. ; pascal CRMRecPtr CRMSearch(CRMRecPtr crmReqPtr)
  118. ;
  119.     IF ¨ GENERATINGCFM THEN
  120.         Macro
  121.         _CRMSearch
  122.             move.w              #$0505,-(sp)
  123.             move.l              sp,A0
  124.             dc.w                $A08B
  125.             addq.w              #2,sp
  126.         EndM
  127.     ELSE
  128.         IMPORT_CFM_FUNCTION CRMSearch
  129.     ENDIF
  130.  
  131. ;
  132. ; pascal short CRMGetCRMVersion(void )
  133. ;
  134.     IF ¨ GENERATINGCFM THEN
  135.         Macro
  136.         _CRMGetCRMVersion
  137.             move.w              #$0506,-(sp)
  138.             move.l              sp,A0
  139.             dc.w                $A08B
  140.             addq.w              #2,sp
  141.         EndM
  142.     ELSE
  143.         IMPORT_CFM_FUNCTION CRMGetCRMVersion
  144.     ENDIF
  145.  
  146. ;
  147. ; pascal Handle CRMGetResource(ResType theType, short theID)
  148. ;
  149.     IF ¨ GENERATINGCFM THEN
  150.         Macro
  151.         _CRMGetResource
  152.             move.w              #$0507,-(sp)
  153.             move.l              sp,A0
  154.             dc.w                $A08B
  155.             addq.w              #2,sp
  156.         EndM
  157.     ELSE
  158.         IMPORT_CFM_FUNCTION CRMGetResource
  159.     ENDIF
  160.  
  161. ;
  162. ; pascal Handle CRMGet1Resource(ResType theType, short theID)
  163. ;
  164.     IF ¨ GENERATINGCFM THEN
  165.         Macro
  166.         _CRMGet1Resource
  167.             move.w              #$0508,-(sp)
  168.             move.l              sp,A0
  169.             dc.w                $A08B
  170.             addq.w              #2,sp
  171.         EndM
  172.     ELSE
  173.         IMPORT_CFM_FUNCTION CRMGet1Resource
  174.     ENDIF
  175.  
  176. ;
  177. ; pascal Handle CRMGetIndResource(ResType theType, short index)
  178. ;
  179.     IF ¨ GENERATINGCFM THEN
  180.         Macro
  181.         _CRMGetIndResource
  182.             move.w              #$0509,-(sp)
  183.             move.l              sp,A0
  184.             dc.w                $A08B
  185.             addq.w              #2,sp
  186.         EndM
  187.     ELSE
  188.         IMPORT_CFM_FUNCTION CRMGetIndResource
  189.     ENDIF
  190.  
  191. ;
  192. ; pascal Handle CRMGet1IndResource(ResType theType, short index)
  193. ;
  194.     IF ¨ GENERATINGCFM THEN
  195.         Macro
  196.         _CRMGet1IndResource
  197.             move.w              #$050A,-(sp)
  198.             move.l              sp,A0
  199.             dc.w                $A08B
  200.             addq.w              #2,sp
  201.         EndM
  202.     ELSE
  203.         IMPORT_CFM_FUNCTION CRMGet1IndResource
  204.     ENDIF
  205.  
  206. ;
  207. ; pascal Handle CRMGetNamedResource(ResType theType, ConstStr255Param name)
  208. ;
  209.     IF ¨ GENERATINGCFM THEN
  210.         Macro
  211.         _CRMGetNamedResource
  212.             move.w              #$050B,-(sp)
  213.             move.l              sp,A0
  214.             dc.w                $A08B
  215.             addq.w              #2,sp
  216.         EndM
  217.     ELSE
  218.         IMPORT_CFM_FUNCTION CRMGetNamedResource
  219.     ENDIF
  220.  
  221. ;
  222. ; pascal Handle CRMGet1NamedResource(ResType theType, ConstStr255Param name)
  223. ;
  224.     IF ¨ GENERATINGCFM THEN
  225.         Macro
  226.         _CRMGet1NamedResource
  227.             move.w              #$050C,-(sp)
  228.             move.l              sp,A0
  229.             dc.w                $A08B
  230.             addq.w              #2,sp
  231.         EndM
  232.     ELSE
  233.         IMPORT_CFM_FUNCTION CRMGet1NamedResource
  234.     ENDIF
  235.  
  236. ;
  237. ; pascal void CRMReleaseResource(Handle theHandle)
  238. ;
  239.     IF ¨ GENERATINGCFM THEN
  240.         Macro
  241.         _CRMReleaseResource
  242.             move.w              #$050D,-(sp)
  243.             move.l              sp,A0
  244.             dc.w                $A08B
  245.             addq.w              #2,sp
  246.         EndM
  247.     ELSE
  248.         IMPORT_CFM_FUNCTION CRMReleaseResource
  249.     ENDIF
  250.  
  251. ;
  252. ; pascal Handle CRMGetToolResource(short procID, ResType theType, short theID)
  253. ;
  254.     IF ¨ GENERATINGCFM THEN
  255.         Macro
  256.         _CRMGetToolResource
  257.             move.w              #$0523,-(sp)
  258.             move.l              sp,A0
  259.             dc.w                $A08B
  260.             addq.w              #2,sp
  261.         EndM
  262.     ELSE
  263.         IMPORT_CFM_FUNCTION CRMGetToolResource
  264.     ENDIF
  265.  
  266. ;
  267. ; pascal Handle CRMGetToolNamedResource(short procID, ResType theType, ConstStr255Param name)
  268. ;
  269.     IF ¨ GENERATINGCFM THEN
  270.         Macro
  271.         _CRMGetToolNamedResource
  272.             move.w              #$0526,-(sp)
  273.             move.l              sp,A0
  274.             dc.w                $A08B
  275.             addq.w              #2,sp
  276.         EndM
  277.     ELSE
  278.         IMPORT_CFM_FUNCTION CRMGetToolNamedResource
  279.     ENDIF
  280.  
  281. ;
  282. ; pascal void CRMReleaseToolResource(short procID, Handle theHandle)
  283. ;
  284.     IF ¨ GENERATINGCFM THEN
  285.         Macro
  286.         _CRMReleaseToolResource
  287.             move.w              #$0524,-(sp)
  288.             move.l              sp,A0
  289.             dc.w                $A08B
  290.             addq.w              #2,sp
  291.         EndM
  292.     ELSE
  293.         IMPORT_CFM_FUNCTION CRMReleaseToolResource
  294.     ENDIF
  295.  
  296. ;
  297. ; pascal long CRMGetIndex(Handle theHandle)
  298. ;
  299.     IF ¨ GENERATINGCFM THEN
  300.         Macro
  301.         _CRMGetIndex
  302.             move.w              #$050E,-(sp)
  303.             move.l              sp,A0
  304.             dc.w                $A08B
  305.             addq.w              #2,sp
  306.         EndM
  307.     ELSE
  308.         IMPORT_CFM_FUNCTION CRMGetIndex
  309.     ENDIF
  310.  
  311. ;
  312. ; pascal short CRMLocalToRealID(ResType bundleType, short toolID, ResType theType, short localID)
  313. ;
  314.     IF ¨ GENERATINGCFM THEN
  315.         Macro
  316.         _CRMLocalToRealID
  317.             move.w              #$050F,-(sp)
  318.             move.l              sp,A0
  319.             dc.w                $A08B
  320.             addq.w              #2,sp
  321.         EndM
  322.     ELSE
  323.         IMPORT_CFM_FUNCTION CRMLocalToRealID
  324.     ENDIF
  325.  
  326. ;
  327. ; pascal short CRMRealToLocalID(ResType bundleType, short toolID, ResType theType, short realID)
  328. ;
  329.     IF ¨ GENERATINGCFM THEN
  330.         Macro
  331.         _CRMRealToLocalID
  332.             move.w              #$0510,-(sp)
  333.             move.l              sp,A0
  334.             dc.w                $A08B
  335.             addq.w              #2,sp
  336.         EndM
  337.     ELSE
  338.         IMPORT_CFM_FUNCTION CRMRealToLocalID
  339.     ENDIF
  340.  
  341. ;
  342. ; pascal OSErr CRMGetIndToolName(OSType bundleType, short index, Str255 toolName)
  343. ;
  344.     IF ¨ GENERATINGCFM THEN
  345.         Macro
  346.         _CRMGetIndToolName
  347.             move.w              #$0511,-(sp)
  348.             move.l              sp,A0
  349.             dc.w                $A08B
  350.             addq.w              #2,sp
  351.         EndM
  352.     ELSE
  353.         IMPORT_CFM_FUNCTION CRMGetIndToolName
  354.     ENDIF
  355.  
  356. ;
  357. ; pascal OSErr CRMFindCommunications(short *vRefNum, long *dirID)
  358. ;
  359.     IF ¨ GENERATINGCFM THEN
  360.         Macro
  361.         _CRMFindCommunications
  362.             move.w              #$051A,-(sp)
  363.             move.l              sp,A0
  364.             dc.w                $A08B
  365.             addq.w              #2,sp
  366.         EndM
  367.     ELSE
  368.         IMPORT_CFM_FUNCTION CRMFindCommunications
  369.     ENDIF
  370.  
  371. ;
  372. ; pascal Boolean CRMIsDriverOpen(ConstStr255Param driverName)
  373. ;
  374.     IF ¨ GENERATINGCFM THEN
  375.         Macro
  376.         _CRMIsDriverOpen
  377.             move.w              #$0521,-(sp)
  378.             move.l              sp,A0
  379.             dc.w                $A08B
  380.             addq.w              #2,sp
  381.         EndM
  382.     ELSE
  383.         IMPORT_CFM_FUNCTION CRMIsDriverOpen
  384.     ENDIF
  385.  
  386. ;
  387. ; pascal CRMErr CRMParseCAPSResource(Handle theHandle, ResType selector, unsigned long *value)
  388. ;
  389.     IF ¨ GENERATINGCFM THEN
  390.         Macro
  391.         _CRMParseCAPSResource
  392.             move.w              #$0525,-(sp)
  393.             move.l              sp,A0
  394.             dc.w                $A08B
  395.             addq.w              #2,sp
  396.         EndM
  397.     ELSE
  398.         IMPORT_CFM_FUNCTION CRMParseCAPSResource
  399.     ENDIF
  400.  
  401. ;
  402. ; pascal OSErr CRMReserveRF(short refNum)
  403. ;
  404.     IF ¨ GENERATINGCFM THEN
  405.         Macro
  406.         _CRMReserveRF
  407.             move.w              #$0513,-(sp)
  408.             move.l              sp,A0
  409.             dc.w                $A08B
  410.             addq.w              #2,sp
  411.         EndM
  412.     ELSE
  413.         IMPORT_CFM_FUNCTION CRMReserveRF
  414.     ENDIF
  415.  
  416. ;
  417. ; pascal OSErr CRMReleaseRF(short refNum)
  418. ;
  419.     IF ¨ GENERATINGCFM THEN
  420.         Macro
  421.         _CRMReleaseRF
  422.             move.w              #$0514,-(sp)
  423.             move.l              sp,A0
  424.             dc.w                $A08B
  425.             addq.w              #2,sp
  426.         EndM
  427.     ELSE
  428.         IMPORT_CFM_FUNCTION CRMReleaseRF
  429.     ENDIF
  430.  
  431.     ENDIF
  432.     ENDIF ; __COMMRESOURCES__ 
  433.  
  434.